package com.example.service;

import com.example.mapper.LogInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Description:
 * User: 阿宾
 * Date: 2025-05-08
 * Time: 16:17
 */
@Service
public class LogService {
    @Autowired
    private LogInfoMapper logInfoMapper;

    @Transactional(propagation = Propagation.NESTED)
    public Integer insert(String userName, String op) {
        try {
            int a = 10/0;
        }catch (Exception e){
            e.printStackTrace();
        }

        return logInfoMapper.insertLog(userName,op);
    }
}
